package com.jxm.bootstudy.controller;

import com.jxm.bootstudy.pojo.User;
import com.jxm.bootstudy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: jxm
 * @Description:
 * @Date: 2024-1-5 15:28
 * @Version: 1.0
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping("/listener/publish")
    public String publish() {
       User user = userService.getUser2();
        return user.getName() + "\t" + user.getPassword();
    }

}